<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/7/1 0001
 * Time: 上午 11:10
 */

namespace app\sports_admin\model;


use think\Model;
use traits\model\SoftDelete;

class AppExplain extends Model
{
    use SoftDelete;

    protected $table = 'app_explain';

    protected $pk = 'id';

    protected $autoWriteTimestamp = true;

    /**
     * app用户协议首页
     * @param 分页以及检索信息
     */
    public static function getList($params)
    {
        $rows = self::order('id','desc')->limit($params['rows'])->page($params['page'])->select();
        $total = self::count();
        return ['rows'=>$rows,'total'=>$total];
    }
}